package com.sokal.easycare.modules.position.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * 岗位职责Entity
 * @author yangmin
 * @version 2017-04-05
 */
public class ServiceOffer extends DataEntity<ServiceOffer> {
	
	private static final long serialVersionUID = 1L;
	private String itemId;		// item_id
	private String action;		// 动作
	private String serviceOfferName;		// 服务名
	private String serviceOfferDesc;		// 服务说明
	private String serviceOfferType;		// 服务类型
	private String state;		// 状态
	private Date stateDate;		// 状态改变时间
	private Date effectiveStartDate;		// 生效时间
	private Date effectiveEndDate;		// 失效时间
	
	public ServiceOffer() {
		super();
	}

	public ServiceOffer(String id){
		super(id);
	}

	@Length(min=0, max=42, message="item_id长度必须介于 0 和 42 之间")
	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}
	
	@Length(min=0, max=6, message="动作长度必须介于 0 和 6 之间")
	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}
	
	@Length(min=0, max=40, message="服务名长度必须介于 0 和 40 之间")
	public String getServiceOfferName() {
		return serviceOfferName;
	}

	public void setServiceOfferName(String serviceOfferName) {
		this.serviceOfferName = serviceOfferName;
	}
	
	@Length(min=0, max=255, message="服务说明长度必须介于 0 和 255 之间")
	public String getServiceOfferDesc() {
		return serviceOfferDesc;
	}

	public void setServiceOfferDesc(String serviceOfferDesc) {
		this.serviceOfferDesc = serviceOfferDesc;
	}
	
	public String getServiceOfferType() {
		return serviceOfferType;
	}

	public void setServiceOfferType(String serviceOfferType) {
		this.serviceOfferType = serviceOfferType;
	}
	
	@Length(min=1, max=3, message="状态长度必须介于 1 和 3 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="状态改变时间不能为空")
	public Date getStateDate() {
		return stateDate;
	}

	public void setStateDate(Date stateDate) {
		this.stateDate = stateDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="生效时间不能为空")
	public Date getEffectiveStartDate() {
		return effectiveStartDate;
	}

	public void setEffectiveStartDate(Date effectiveStartDate) {
		this.effectiveStartDate = effectiveStartDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEffectiveEndDate() {
		return effectiveEndDate;
	}

	public void setEffectiveEndDate(Date effectiveEndDate) {
		this.effectiveEndDate = effectiveEndDate;
	}
	
}